home *** CD-ROM | disk | FTP | other *** search
- # this is a short example that illustrates
- # using a continuous controller parameter
- # VOLUME to modulate the output of two voices.
- #
- # Organization:
- # vco 1 chords
- # vco 2 low chord
- # vco 3 ccont volume for vco 1
- # vco 4 ccont volume for vco 2
- #
- # The mos setup must reflect the above organization;
- # i.e., set vco 3's midi channel to vco 1
- # set vco 4's midi channel to vco 2
- #
- # The basis idea is that vco 3 and vco 4 implement
- # a rising volume wave.
-
-
- # two patches used
- LOSTRINGS=4
- STRINGS=5
-
- # ccont volume param
- VOLUME = 7
-
- vco vco1sect1
- patch LOSTRINGS
- # void dumpstk(1)
- do
- # 3 measures, F#->E
- F# 0,h 127
- LE 0,3*w
- LB h,3*w
- E {3*w}-h
- # 3 measures, LA->LG
- E 0,h
- LB 0,3*w
- LA 0,3*w
- LD h,3*w
- D {3*w}-h
- # 3 measures
- D 0,h
- LA 0,3*w
- LG 0,3*w
- LC h,3*w
- C {3*w}-h
- #
- C 0,h
- LA 0,3*w
- LF# 0,3*w
- LLB h,3*w
- B {3*w}-h
- while 4
-
- end
-
- vco vco2sect1
- patch STRINGS
- do
- LE w,3*w 127
- LLE 2*w
-
- LD w,3*w
- LLD 2*w
-
- LC w,3*w
- LLC 2*w
-
- LLB w,3*w
- LLLB 2*w
- while 4
- end
-
- # applied to vco 1
- vco vco3sect1
- int remtime
- int remslice
- int i
- int vol1
-
- # rest 12 measures
- do
- rest w
- while 12
-
- # set volume to zero
- ccont 0 VOLUME 0
- rest 2 * w
-
- # calculate and loop for waves that take 22 measures in all
- # with wave repeating during that time
- remtime = 22 * w
- remslice = remtime / 4
- vol1 = 30
- for ( i = 0; i < remslice; i++)
- if (vol1 >= 127)
- vol1 = 30
- end
- ccont 4 VOLUME vol1
- vol1 = vol1 + 3
- end
- end
- # applied to vco 2
- vco vco4sect1
- int remtime
- int remslice
- int i
- int vol1
-
- do
- rest w
- while 12
-
- ccont 0 VOLUME 0
-
- remtime = 22 * w
- remslice = remtime / 4
- vol1 = 30
- for ( i = 0; i < remslice; i++)
- if (vol1 >= 127)
- vol1 = 30
- end
- ccont 4 VOLUME vol1
- vol1 = vol1 + 3
- end
- end
-
-